package com.leyoucommon.pojo;

import lombok.Data;

import java.util.List;

/**
 * 表示分页结果的响应数据
 * @version 1.0.0
 * @Author yong.Mr
 * @data 2019-8-9
 */
@Data
public class PageResult<T> {

    // 总条数
    private Integer total;

    // 总页数
    private Integer totalPage;

    // 当前页的数据
    private List<T> items;

    public PageResult() {
    }

    public PageResult(Integer total, List<T> items) {
        this.total = total;
        this.items = items;
    }

    public PageResult(Integer total, Integer totalPage, List<T> items) {
        this.total = total;
        this.totalPage = totalPage;
        this.items = items;
    }
}
